﻿<BaseControl:DialogControl x:Class="jSLApp.Client.Forms.UserDetail"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:BaseControl="clr-namespace:jSLCore.Client.Presentation.BaseControl;assembly=jSLCore.Client.Presentation" xmlns:j="clr-namespace:jSLCore.Client.Presentation.Controls;assembly=jSLCore.Client.Presentation" xmlns:jBinding="clr-namespace:jSLCore.Client.Presentation.jBinding;assembly=jSLCore.Client.Presentation" xmlns:BaseConverters="clr-namespace:jSLCore.Client.Presentation.jBinding.BaseConverters;assembly=jSLCore.Client.Presentation" mc:Ignorable="d"
    d:DesignHeight="300" d:DesignWidth="400" Icon="../Resources/User.png" Title="Управление">
    <j:ImageGroupBox Header="Параметры аккаунта">        
        <StackPanel Orientation="Vertical">
            <j:LeftHeaderContainer Header="Логин:">
                <TextBlock Text="{Binding Login}"/>
            </j:LeftHeaderContainer>
            <j:LeftHeaderContainer Header="Email:">
                <HyperlinkButton Content="{Binding email}" Click="senMail" ToolTipService.ToolTip="Написать письмо"/>
            </j:LeftHeaderContainer>
            <j:LeftHeaderContainer Header="Дата регистрации:">
                <TextBlock>
                    <TextBlock.Text>
                        <jBinding:jBinding Path="CreationDate" ConvertingMode="ToShortDate"/>
                    </TextBlock.Text>
                </TextBlock>
            </j:LeftHeaderContainer>
                <j:LeftHeaderContainer Header="Последний визит:">
                    <TextBlock>
                    <TextBlock.Text>
                       <jBinding:jBinding Path="LastVisit" ConvertingMode="ToShortDateAndTime"/>
                    </TextBlock.Text>
                    </TextBlock>
                </j:LeftHeaderContainer>
                
                <j:LeftHeaderContainer Header="Название проекта (Псевдоним):">
                <TextBlock Text="{Binding Name}"/>
            </j:LeftHeaderContainer>
            <j:LeftHeaderContainer Header="Роль:">
                <HyperlinkButton Content="{Binding RoleText}" Click="changeRole_Clicked"/>
            </j:LeftHeaderContainer>
            <CheckBox Content="Блокировка" Click="locker_Clicked">
                <CheckBox.IsChecked>
                    <jBinding:jBinding Path="IsEnabled" ConvertingMode="InvertBoolean"/>                                            
                </CheckBox.IsChecked>
            </CheckBox>
            <HyperlinkButton Content="Подтвердить EMail" Click="acceptMail_Clicked">
                <HyperlinkButton.Visibility>
                    <jBinding:jBinding Path="emailAccepted">
                        <jBinding:jBinding.Converter>
                            <BaseConverters:jBoolToVisibilityConverter>
                                <BaseConverters:jInvertBooleanConverter/>
                            </BaseConverters:jBoolToVisibilityConverter>
                        </jBinding:jBinding.Converter>
                    </jBinding:jBinding>
                </HyperlinkButton.Visibility>
            </HyperlinkButton>                        
            <j:ImageButton Content="Удалить" Image="../Resources/delete.png" Click="delete_Clicked">               
            </j:ImageButton>
            <HyperlinkButton Content="Перейти в личный кабинет" Click="goPersonalPage_Clicked"/>
        </StackPanel>            
    </j:ImageGroupBox>
</BaseControl:DialogControl>
